package com.happy.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

@TableName ("question_info")
public class QuestionEntity {

    @TableId (value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField ("title")
    private String title;
    @TableField ("subTitle")
    private String subTitle;
    @TableField ("content")
    private String content;
    @TableField ("categoryId")
    private Integer categoryId;
    @TableField (exist = false)
    private String categoryName;

    @TableField ("createTime")
    private Date createTime;
    @TableField ("changeTime")
    private Date changeTime;
    @TableField ("isUsed")
    private Integer isUsed;


    public Integer getId () {
        return id;
    }

    public void setId ( Integer id ) {
        this.id = id;
    }

    public String getTitle () {
        return title;
    }

    public void setTitle ( String title ) {
        this.title = title;
    }

    public String getSubTitle () {
        return subTitle;
    }

    public void setSubTitle ( String subTitle ) {
        this.subTitle = subTitle;
    }

    public String getContent () {
        return content;
    }

    public void setContent ( String content ) {
        this.content = content;
    }

    public Integer getCategoryId () {
        return categoryId;
    }

    public void setCategoryId ( Integer categoryId ) {
        this.categoryId = categoryId;
    }

    public String getCategoryName () {
        return categoryName;
    }

    public void setCategoryName ( String categoryName ) {
        this.categoryName = categoryName;
    }

    public Date getCreateTime () {
        return createTime;
    }

    public void setCreateTime ( Date createTime ) {
        this.createTime = createTime;
    }

    public Date getChangeTime () {
        return changeTime;
    }

    public void setChangeTime ( Date changeTime ) {
        this.changeTime = changeTime;
    }

    public Integer getIsUsed () {
        return isUsed;
    }

    public void setIsUsed ( Integer isUsed ) {
        this.isUsed = isUsed;
    }

    @Override
    public String toString () {
        return "QuestionEntity{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", subTitle='" + subTitle + '\'' +
                ", content='" + content + '\'' +
                ", categoryId=" + categoryId +
                ", createTime=" + createTime +
                ", changeTime=" + changeTime +
                ", isUsed=" + isUsed +
                '}';
    }
}
